package com.zx.fm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zx.common.annotation.Excel;
import com.zx.common.annotation.Excels;
import com.zx.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * -- 高贵的马儿驱逐体内的一切外力 --
 *
 * @author kaajee
 * @date 2025/9/1
 * @desc
 */
@Setter
@Getter
public class ReimbursementApplication extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 报销ID */
    private Long id;

    /** 申请编号 */
    @Excel(name = "申请编号")
    private String applicationNo;

    /** 申请人ID */
    @Excel(name = "申请人ID")
    private Long userId;

    /** 报销金额 */
    @Excel(name = "报销金额")
    private BigDecimal amount;

    /** 请款内容 */
    @Excel(name = "请款内容")
    private String reason;

    /** 申请时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date applicationTime;

    /** 状态：3-待审批，1-已批准，2-已拒绝 */
    @Excel(name = "审批状态",readConverterExp="3=待审批,1=已批准,2=已拒绝")
    private String status;

    /** 审批人ID */
    @Excel(name = "审批人ID")
    private Long approvalUserId;

    /** 审批时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approvalTime;

    /**  */
    @Excel(name = "项目ID")
    private Long projectId;

    /** 审批备注 */
    @Excel(name = "审批备注")
    private String approvalRemark;

    /** 收款方式(1为现金,2为转账) */
    @Excel(name = "收款方式", readConverterExp="1=现金,2=转账")
    private Long paymentMethod;

    /** 收款银行 */
    @Excel(name = "收款银行")
    private String receiveBank;

    /** 收款人 */
    @Excel(name = "收款人")
    private String payName;

    /** 收款账号 */
    @Excel(name = "收款账号")
    private String receiveAccount;

    @Excel(name = "附件")
    private String fileUrl;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("applicationNo", getApplicationNo())
                .append("userId", getUserId())
                .append("amount", getAmount())
                .append("reason", getReason())
                .append("applicationTime", getApplicationTime())
                .append("status", getStatus())
                .append("approvalUserId", getApprovalUserId())
                .append("approvalTime", getApprovalTime())
                .append("projectId", getProjectId())
                .append("approvalRemark", getApprovalRemark())
                .append("paymentMethod", getPaymentMethod())
                .append("receiveBank", getReceiveBank())
                .append("payName", getPayName())
                .append("receiveAccount", getReceiveAccount())
                .append("fileUrls", getFileUrl())
                .toString();
    }
}
